package com.wsl.conyroller;

import com.wsl.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author:WangShuliang
 * @Description:
 * @Date:Created in 14:51 2018/1/11
 * @Modified by:
 */
@Controller
public class RedisController {
    @Autowired
    private RedisService  redisService;
    @RequestMapping("getCacheAble")
    @ResponseBody
    public String  getCacheAble(String key){
        System.out.println(redisService.add(key));
        return redisService.add(key);
    }


    @RequestMapping("getKeyAdd")
    @ResponseBody
    public  String getKeyAdd(String key){
        return redisService.keygene(key);
    }
}